package com.example.zhish.gobang.bean;

import android.graphics.Point;

/**
 * 新手等级机器棋手
 * Created by qianjun on 2016/5/1.
 */
public class NovicePlayer extends AIPlayer {

    @Override
    public Point findBestPoint(int table_x, int table_y) {

        int x=(int)(Math.random()*table_x-1);
        int y=(int)(Math.random()*table_y-1);
        int[][] data=GobangCheckboard.getGobangCheckboard(table_x,table_y).table;
        while(data[x][y] != Constant.NO_PIECES){
            x=(int)(Math.random()*table_x-1);
            y=(int)(Math.random()*table_y-1);
        }
        return new Point(x,y);
    }
}
